﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CarBooker.Infrastructure.Repository;
using CarBooker.Models;
using System.Text;

namespace CarBooker.Infrastructure.Repositories
{
    public class SecondCarRepository: SqlRepositoryBase<SecondCar>, ISecondCarRepository
    {

        #region Constructors
            public SecondCarRepository()
                :this(null)
            {

            }
            public SecondCarRepository(IUnitOfWork unitOfWork)
                : base(unitOfWork)
            {
     
            }
        #endregion


        #region ISecondCarRepository Members

        public IList<SecondCar> FindBy(DateTime startDate, DateTime endDate, string Location)
        {
            throw new NotImplementedException();
        }

        public SecondCar FindBy(int CarId)
        {
            StringBuilder builder = this.GetBaseQueryBuilder();
            builder.Append(this.BuildBaseWhereClause(CarId.ToString()));
            //string.Format(" Where c.CarID={0}",CarId));
            builder.Append(";");
            return this.BuildEntityFromSql(builder.ToString());
        }

        #endregion

        #region IRepository<SecondCar> Members



        #endregion

        protected override void BuildChildCallbacks()
        {
            throw new NotImplementedException();
        }

        protected override void PersistNewItem(SecondCar item)
        {
            throw new NotImplementedException();
        }

        protected override void PersistUpdatedItem(SecondCar item)
        {
            throw new NotImplementedException();
        }

        protected override void PersistDeletedItem(SecondCar item)
        {
            throw new NotImplementedException();
        }

        protected override string GetBaseQuery()
        {
            throw new NotImplementedException();
        }

        protected override string GetBaseWhereClause()
        {
            throw new NotImplementedException();
        }

        protected override StringBuilder GetBaseQueryBuilder()
        {
            throw new NotImplementedException();
        }

        
    }
}
